using Tools.Domain.Specifications;
using Webshop20.Domain.Catalog.Core.Products;
using Webshop20.Domain.Shared.Products.Core;

namespace Webshop20.Domain.Catalog.Specifications
{
    public class ProducerSpecification : Specification<Product>
    {
        public int? ProducerId { get; private set; }

        public ProducerSpecification(int? producerId): base(product=>product.Producer.ID == producerId, "NO_PRODUCER_FOUND")
        {
            ProducerId = producerId;
        }
    }
}